<?php
  session_start();
  if ($_POST) {
    header("Location: departamento.php");
    include("config/login-defs.php");
    $query = 'UPDATE departamento SET status = "Fechado" WHERE id_depto = ' . $_POST["keyValue"];
    $data = mysql_query($query) or print(mysql_error());
  }
?>